package com.summer.mall.common;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import java.io.Serializable;

@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class ResponseFileService<T> implements Serializable {

    private Integer status;
    private String msg;
    private T fileName;
    private T path;
    private T fileExtensionName;

    private ResponseFileService(Integer status){
        this.status = status;
    }
    private ResponseFileService(Integer status, String msg){
        this.status = status;
        this.msg = msg;

    }
    private ResponseFileService(Integer status, T fileName,T path,T fileExtensionName){
        this.status = status;
        this.fileName = fileName;
        this.path = path;
        this.fileExtensionName = fileExtensionName;
    }
    private ResponseFileService(Integer status, String msg, T fileName,T path,T fileExtensionName){
        this.status = status;
        this.msg = msg;
        this.fileName = fileName;
        this.path = path;
        this.fileExtensionName = fileExtensionName;
    }

    //上传图片返回的状态，进行泛型约束
    public static<T> ResponseFileService<T> createFileByCodeWaitMessage(String uploadState,T fileName,T path,T fileExtensionName){
        return ResponseFileService.createFileByCodeWaitMessage(uploadState,fileName,path,fileExtensionName);
    }
}
